<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>

    
    * {
        margin: 0;
        padding: 0;
    }

    body {
        width: 1920px;
        height: 1080px;
        overflow: hidden;
    }
    .box {
        position: relative;
        width: 400px;
        height: 400px;
        margin: 250px auto;
        border: 1px solid red;
        transform-style: preserve-3d;
        transition: all 1080s linear;
        transform: rotateX(25deg) rotateY(25deg);
    }

    .box div {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0.3;
    }
    .font {
        transform: translateZ(200px);
        background-color: blue;
    }
    .behand {
        transform: translateZ(-200px);
        background-color: pink;
    }
    .left {
        transform: translateX(200px) rotateY(90deg);
        background-color: red;
    }
    .right {
        transform: translateX(-200px) rotateY(90deg);
        background-color: brown;
    }
    .top {
        transform: translateY(200px) rotateX(90deg);
        background-color: yellow;
    }
    .bottom {
        transform: translateY(-200px) rotateX(90deg);
        background-color: purple;
    }

    body:hover .box{
        transform: rotateX(50000deg) rotateY(50000deg);
    }
      
</style>
<body>
   <div class="box">
        <div class="font"></div>
        <div class="behand"></div>
        <div class="left"></div>
        <div class="right"></div>
        <div class="top"></div>
        <div class="bottom"></div>
   </div>
</body>
</html>